Multivariate normal random values simulation:
Multivariate normal random values simulation
Description
Multivariate normal random values simulation.
Usage
rmvnorm(n, mu, sigma)
Arguments
n
The sample size, a numerical value.
mu
The mean vector in $R^d$.
sigma
The covariance matrix in $R^d$.
Value
A matrix with the simulated data.
Details
The algorithm uses univariate normal random values and transforms them to multivariate via a spectral decomposition.
It is slower than the command mvrnorm available from MASS, but it allows for singular covariance matrices.
This function is used by rcompnorm.
References
Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.